<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::util::Scoped_setter&lt; Value &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1util.html">util</a></li><li class="navelem"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classflow_1_1util_1_1Scoped__setter-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::util::Scoped_setter&lt; Value &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value.  
 <a href="classflow_1_1util_1_1Scoped__setter.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="util_2util_8hpp_source.html">util.hpp</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for flow::util::Scoped_setter&lt; Value &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1util_1_1Scoped__setter__coll__graph.svg" width="160" height="143"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acd854f798e440e7f4a4c18c7b83443fc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html#acd854f798e440e7f4a4c18c7b83443fc">Scoped_setter</a> (Value *target, Value &amp;&amp;val_src_moved)</td></tr>
<tr class="memdesc:acd854f798e440e7f4a4c18c7b83443fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post-condition: <code>*target</code> contains was <code>val_src_moved</code> contained at ctor entry; and the destructor invocation shall reverse this, so that <code>*target</code> is restored to its value at entry.  <a href="classflow_1_1util_1_1Scoped__setter.html#acd854f798e440e7f4a4c18c7b83443fc">More...</a><br /></td></tr>
<tr class="separator:acd854f798e440e7f4a4c18c7b83443fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ac7e58548cfe7989835b11fdc97f02c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html#a2ac7e58548cfe7989835b11fdc97f02c">Scoped_setter</a> (<a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a> &amp;&amp;src_moved)</td></tr>
<tr class="memdesc:a2ac7e58548cfe7989835b11fdc97f02c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move constructor: <code>*this</code> acts as <code>src_moved</code> would-have, while <code>src_moved</code> becomes a no-op object permanently.  <a href="classflow_1_1util_1_1Scoped__setter.html#a2ac7e58548cfe7989835b11fdc97f02c">More...</a><br /></td></tr>
<tr class="separator:a2ac7e58548cfe7989835b11fdc97f02c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f61f7f731e78c9760b925b577cdd503"><td class="memItemLeft" align="right" valign="top"><a id="a9f61f7f731e78c9760b925b577cdd503" name="a9f61f7f731e78c9760b925b577cdd503"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Scoped_setter</b> (const <a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a> &amp;)=delete</td></tr>
<tr class="memdesc:a9f61f7f731e78c9760b925b577cdd503"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prohibit copying: for each <code>explicit</code> ctor invocation, there shall be exactly 1 non-no-op dtor invocation. <br /></td></tr>
<tr class="separator:a9f61f7f731e78c9760b925b577cdd503"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12ca74f225f756458f872e6f0da60695"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html#a12ca74f225f756458f872e6f0da60695">~Scoped_setter</a> ()</td></tr>
<tr class="memdesc:a12ca74f225f756458f872e6f0da60695"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restores <code>*target</code> (from main ctor) to its value at entry to said ctor; or does nothing if <code>*this</code> has been moved-from via the move ctor.  <a href="classflow_1_1util_1_1Scoped__setter.html#a12ca74f225f756458f872e6f0da60695">More...</a><br /></td></tr>
<tr class="separator:a12ca74f225f756458f872e6f0da60695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4464d1c39413033a0e457a494363bce"><td class="memItemLeft" align="right" valign="top"><a id="aa4464d1c39413033a0e457a494363bce" name="aa4464d1c39413033a0e457a494363bce"></a>
<a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a> &amp;)=delete</td></tr>
<tr class="memdesc:aa4464d1c39413033a0e457a494363bce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prohibit copying (see <code>delete</code>d copy ctor). <br /></td></tr>
<tr class="separator:aa4464d1c39413033a0e457a494363bce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0dcbc446c250933940ead3cb589c1eb"><td class="memItemLeft" align="right" valign="top"><a id="ae0dcbc446c250933940ead3cb589c1eb" name="ae0dcbc446c250933940ead3cb589c1eb"></a>
<a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a> &amp;&amp;)=delete</td></tr>
<tr class="memdesc:ae0dcbc446c250933940ead3cb589c1eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prohibit modifying existing <code>*this</code>; except that moving-from is enabled via the move ctor. <br /></td></tr>
<tr class="separator:ae0dcbc446c250933940ead3cb589c1eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ab36f9981921da6540fc5c308e4c19a9c"><td class="memItemLeft" align="right" valign="top">Value *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c">m_target_or_null</a></td></tr>
<tr class="memdesc:ab36f9981921da6540fc5c308e4c19a9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Target object location; see ctors; if null then this is a moved-from <a class="el" href="classflow_1_1util_1_1Scoped__setter.html" title="A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...">Scoped_setter</a> that intentionally no-ops.  <a href="classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c">More...</a><br /></td></tr>
<tr class="separator:ab36f9981921da6540fc5c308e4c19a9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8547c08154499e1694202da49afb7202"><td class="memItemLeft" align="right" valign="top">Value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html#a8547c08154499e1694202da49afb7202">m_saved_value</a></td></tr>
<tr class="memdesc:a8547c08154499e1694202da49afb7202"><td class="mdescLeft">&#160;</td><td class="mdescRight">If and only if <a class="el" href="classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c" title="Target object location; see ctors; if null then this is a moved-from Scoped_setter that intentionally...">m_target_or_null</a> is non-null, this saves <code>*m_target_or_null</code>. Otherwise meaningless.  <a href="classflow_1_1util_1_1Scoped__setter.html#a8547c08154499e1694202da49afb7202">More...</a><br /></td></tr>
<tr class="separator:a8547c08154499e1694202da49afb7202"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename Value&gt;<br />
class flow::util::Scoped_setter&lt; Value &gt;</div><p >A simple RAII-pattern class template that, at construction, sets the specified location in memory to a specified value, memorizing the previous contents; and at destruction restores the value. </p>
<p >E.g.:</p>
<div class="fragment"><div class="line"><span class="keyword">thread_local</span> <span class="keywordtype">int</span> s_this_thread_val;</div>
<div class="line">...</div>
<div class="line">{</div>
<div class="line">  <a class="code hl_class" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter&lt;int&gt;</a> setter(&amp;s_this_thread_val, 75); <span class="comment">// Set it to 75 and memorize (whatever).</span></div>
<div class="line">  ...</div>
<div class="line">  {</div>
<div class="line">    <a class="code hl_class" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter&lt;int&gt;</a> setter(&amp;s_this_thread_val, 125); <span class="comment">// Set it to 125 and memorize 75.</span></div>
<div class="line">    ...</div>
<div class="line">  } <span class="comment">// Restored from 125 to 75.</span></div>
<div class="line">  ...</div>
<div class="line">} <span class="comment">// Restored from (probably) 75 to (whatever).</span></div>
<div class="ttc" id="aclassflow_1_1util_1_1Scoped__setter_html"><div class="ttname"><a href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter</a></div><div class="ttdoc">A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...</div><div class="ttdef"><b>Definition:</b> <a href="util_2util_8hpp_source.html#l00144">util.hpp:145</a></div></div>
</div><!-- fragment --><p >The object is movable, not copyable (which is similar to <code>unique_ptr</code>) to prevent "double-restore." Related: one can easily return customized auto-setter/restorers:</p>
<div class="fragment"><div class="line"><span class="keyword">thread_local</span> Widget s_widget;</div>
<div class="line"><span class="keyword">auto</span> widget_setter_auto(Widget&amp;&amp; widget_moved)</div>
<div class="line">{</div>
<div class="line">  <span class="keywordflow">return</span> <a class="code hl_class" href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter&lt;Widget&gt;</a>(&amp;s_widget, std::move(widget_moved));</div>
<div class="line">}</div>
<div class="line">...</div>
<div class="line">  { <span class="comment">// Later, some block: Set s_widget.  Code here doesn&#39;t even know/care a Scoped_setter is involved.</span></div>
<div class="line">    <span class="keyword">const</span> <span class="keyword">auto</span> setter_auto = widget_setter_auto({ ...widget-init... });</div>
<div class="line">    ...</div>
<div class="line">  } <span class="comment">// Restore s_widget.</span></div>
</div><!-- fragment --><h3>Thready safety</h3>
<p >This is a simple object: it just performs a few assignments without any added concurrency protection. If the memory location can be accessed simultaneously by other threads, watch out.</p>
<p >In particular it's a good fit for thread-local locations: <code>&amp;X</code>, where <code>X</code> is declared <code>thread_local</code>, or <code>X == *(P.get())</code> where <code>P</code> is a <code>boost::thread_specific_ptr</code>.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Value</td><td>The stored type, which must be move-assignable and move-constructible. All <code>Value</code> writes are performed using exclusively these operations. Informally: For best performance when <code>Value</code> is a heavy-weight type, these operations should be be written to be light-weight, such as in terms of swapping a few scalars. In particular this is already the case for all STL-compliant container types.</td></tr>
  </table>
  </dd>
</dl>
<h3>Implementation</h3>
<p >An alternative implementation, which could even be reduced to just an alias, would have used <code>unique_ptr</code>. However in this case I (ygoldfel) wanted maximum control for perf. The use case originally driving this was the thread-local verbosity override: <a class="el" href="classflow_1_1log_1_1Config.html#ab025990297cc07d51aaec277af203dfe" title="Sets *(this_thread_verbosity_override()) = most_verbose_sev_or_none; and returns an object that shall...">log::Config::this_thread_verbosity_override_auto()</a>. <a class="el" href="namespaceflow_1_1log.html" title="Flow module providing logging functionality.">flow::log</a> is fairly paranoid about performance, in general, although admittedly this particular call isn't necessarily ubiquitous. </p>

<p class="definition">Definition at line <a class="el" href="util_2util_8hpp_source.html#l00144">144</a> of file <a class="el" href="util_2util_8hpp_source.html">util.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="acd854f798e440e7f4a4c18c7b83443fc" name="acd854f798e440e7f4a4c18c7b83443fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd854f798e440e7f4a4c18c7b83443fc">&#9670;&nbsp;</a></span>Scoped_setter() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Value &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter</a>&lt; Value &gt;::Scoped_setter </td>
          <td>(</td>
          <td class="paramtype">Value *&#160;</td>
          <td class="paramname"><em>target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Value &amp;&amp;&#160;</td>
          <td class="paramname"><em>val_src_moved</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Post-condition: <code>*target</code> contains was <code>val_src_moved</code> contained at ctor entry; and the destructor invocation shall reverse this, so that <code>*target</code> is restored to its value at entry. </p>
<p ><code>*this</code> cannot be copied, but it can be moved. As a result, it is guaranteed that the aforementioned destructor will execute exactly once; however it can be move-constructed-from-<code>*this</code> other Scope_setter's destructor, while our own dtor therefore is a no-op.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">target</td><td>The target object that shall be set to <code>val_src_moved</code> now and restored in our, or moved-object's, dtor. The current value of <code>*target</code> is saved internally via assignment of <code>move(*target)</code>. Behavior undefined (assertion may trip) if null. </td></tr>
    <tr><td class="paramname">val_src_moved</td><td>Value to save to <code>*target</code> immediately, via assignment of <code>move(val_src_moved)</code>. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="util_2util_8hpp_source.html#l00206">206</a> of file <a class="el" href="util_2util_8hpp_source.html">util.hpp</a>.</p>

<p class="reference">References <a class="el" href="util_2util_8hpp_source.html#l00195">flow::util::Scoped_setter&lt; Value &gt;::m_target_or_null</a>.</p>

</div>
</div>
<a id="a2ac7e58548cfe7989835b11fdc97f02c" name="a2ac7e58548cfe7989835b11fdc97f02c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ac7e58548cfe7989835b11fdc97f02c">&#9670;&nbsp;</a></span>Scoped_setter() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Value &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter</a>&lt; Value &gt;::Scoped_setter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a>&lt; Value &gt; &amp;&amp;&#160;</td>
          <td class="paramname"><em>src_moved</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move constructor: <code>*this</code> acts as <code>src_moved</code> would-have, while <code>src_moved</code> becomes a no-op object permanently. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src_moved</td><td>Source object. Its destructor shall do nothing after this returns. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="util_2util_8hpp_source.html#l00214">214</a> of file <a class="el" href="util_2util_8hpp_source.html">util.hpp</a>.</p>

<p class="reference">References <a class="el" href="util_2util_8hpp_source.html#l00195">flow::util::Scoped_setter&lt; Value &gt;::m_target_or_null</a>.</p>

</div>
</div>
<a id="a12ca74f225f756458f872e6f0da60695" name="a12ca74f225f756458f872e6f0da60695"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12ca74f225f756458f872e6f0da60695">&#9670;&nbsp;</a></span>~Scoped_setter()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Value &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter</a>&lt; Value &gt;::~<a class="el" href="classflow_1_1util_1_1Scoped__setter.html">Scoped_setter</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Restores <code>*target</code> (from main ctor) to its value at entry to said ctor; or does nothing if <code>*this</code> has been moved-from via the move ctor. </p>

<p class="definition">Definition at line <a class="el" href="util_2util_8hpp_source.html#l00225">225</a> of file <a class="el" href="util_2util_8hpp_source.html">util.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a8547c08154499e1694202da49afb7202" name="a8547c08154499e1694202da49afb7202"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8547c08154499e1694202da49afb7202">&#9670;&nbsp;</a></span>m_saved_value</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Value &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Value <a class="el" href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter</a>&lt; Value &gt;::m_saved_value</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If and only if <a class="el" href="classflow_1_1util_1_1Scoped__setter.html#ab36f9981921da6540fc5c308e4c19a9c" title="Target object location; see ctors; if null then this is a moved-from Scoped_setter that intentionally...">m_target_or_null</a> is non-null, this saves <code>*m_target_or_null</code>. Otherwise meaningless. </p>

<p class="definition">Definition at line <a class="el" href="util_2util_8hpp_source.html#l00198">198</a> of file <a class="el" href="util_2util_8hpp_source.html">util.hpp</a>.</p>

</div>
</div>
<a id="ab36f9981921da6540fc5c308e4c19a9c" name="ab36f9981921da6540fc5c308e4c19a9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab36f9981921da6540fc5c308e4c19a9c">&#9670;&nbsp;</a></span>m_target_or_null</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Value &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Value* <a class="el" href="classflow_1_1util_1_1Scoped__setter.html">flow::util::Scoped_setter</a>&lt; Value &gt;::m_target_or_null</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Target object location; see ctors; if null then this is a moved-from <a class="el" href="classflow_1_1util_1_1Scoped__setter.html" title="A simple RAII-pattern class template that, at construction, sets the specified location in memory to ...">Scoped_setter</a> that intentionally no-ops. </p>

<p class="definition">Definition at line <a class="el" href="util_2util_8hpp_source.html#l00195">195</a> of file <a class="el" href="util_2util_8hpp_source.html">util.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="util_2util_8hpp_source.html#l00206">flow::util::Scoped_setter&lt; Value &gt;::Scoped_setter()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>util/<a class="el" href="util_2util_8hpp_source.html">util.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:36 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
